/**  
* @author renbangjie renbangjie@126.com  
* @date 2014-11-12 上午10:24:51
* @version V1.0  
* <b>Copyright (c)</b> 2014医信金融信息服务（上海）有限公司-版权所有<br/>
*/
package com.yjd.comm.enums;


/**
 * 充值券相关枚举
 * @author renbangjie renbangjie@126.com
 * @date 2014-11-12 上午10:24:51
 */
public class VoucherEnums{

	/**
	 * 充值券状态
	* @author renbangjie renbangjie@126.com
	* @date 2014-11-12 上午10:28:42
	 */
	public enum VoucherStatus{
		
		effectivity(0, "未激活"),
		nullity(1, "已激活");
		
		private int code;
		private String label;
		
		
		public static VoucherStatus parse(int code){
			for (VoucherStatus voucher : VoucherStatus.values()) {
				if(voucher.getCode() == code){
					return voucher;
				}
			}
			return null;
		}
		
		
		private VoucherStatus(int code, String label) {
			this.code = code;
			this.label = label;
		}

		public int getCode() {
			return code;
		}

		public void setCode(int code) {
			this.code = code;
		}

		public String getLabel() {
			return label;
		}

		public void setLabel(String label) {
			this.label = label;
		}
	}
	
	
	
	public enum VoucherType{
		
		voucher(1, "充值券"),
		manageMoney(2, "理财金");
		
		private int code;
		private String label;
		
		
		public static VoucherType parse(int code){
			for (VoucherType voucher : VoucherType.values()) {
				if(voucher.getCode() == code){
					return voucher;
				}
			}
			return null;
		}
		
		
		private VoucherType(int code, String label) {
			this.code = code;
			this.label = label;
		}
		public int getCode() {
			return code;
		}
		public void setCode(int code) {
			this.code = code;
		}
		public String getLabel() {
			return label;
		}
		public void setLabel(String label) {
			this.label = label;
		}
		
	}
	
	
	public enum RechargeStatus{
		
		success(0, "充值成功"),
		repeat(1, "同一个活动只能激活一次"),
		notexits(2, "充值券不存在或已过期"),
		isbalance(3, "还有未使用完的理财金"),
		regdate(20, "您不符合本次活动要求,不能使用"),
		failed(-1, "充值失败");
		
		private int code;
		private String label;
		
		private RechargeStatus(int code, String label) {
			this.code = code;
			this.label = label;
		}

		public int getCode() {
			return code;
		}

		public void setCode(int code) {
			this.code = code;
		}

		public String getLabel() {
			return label;
		}

		public void setLabel(String label) {
			this.label = label;
		}
		
	}
	
}
